package com.twu.biblioteca;

import javax.swing.*;
import java.awt.*;

/**
 * Created with IntelliJ IDEA.
 * User: ruchita
 * Date: 21/9/13
 * Time: 11:46 PM
 * To change this template use File | Settings | File Templates.
 */
public class UserDetailsPage {
    public JPanel panel1;
    private JLabel userNAmeLabel;
    private JLabel userName;
    private JLabel EmailIdLabel;
    private JLabel emailID;

    public UserDetailsPage(String userLibraryNumber) {
        //gEt userDetails using userLibraryNumber
        ValidateUser vu = new ValidateUser();
        try {
            userName.setText(vu.getName(userLibraryNumber));
            emailID.setText(vu.getEmailID(userLibraryNumber));
            phoneNumber.setText("" + vu.getPhoneNumber(userLibraryNumber));
        } catch (NullPointerException e) {
            e.printStackTrace();
        }
    }


    private JLabel phoneNumberLabel;
    private JLabel phoneNumber;


    {
// GUI initializer generated by IntelliJ IDEA GUI Designer
// >>> IMPORTANT!! <<<
// DO NOT EDIT OR ADD ANY CODE HERE!
        $$$setupUI$$$();
    }

    /**
     * Method generated by IntelliJ IDEA GUI Designer
     * >>> IMPORTANT!! <<<
     * DO NOT edit this method OR call it in your code!
     *
     * @noinspection ALL
     */
    private void $$$setupUI$$$() {
        panel1 = new JPanel();
        panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), -1, -1));
        EmailIdLabel = new JLabel();
        EmailIdLabel.setText("EmailID");
        panel1.add(EmailIdLabel, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(131, 49), null, 0, false));
        phoneNumberLabel = new JLabel();
        phoneNumberLabel.setText("PhoneNumber");
        panel1.add(phoneNumberLabel, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(131, 13), null, 0, false));
        emailID = new JLabel();
        emailID.setText("");
        panel1.add(emailID, new com.intellij.uiDesigner.core.GridConstraints(1, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(131, 49), null, 0, false));
        phoneNumber = new JLabel();
        phoneNumber.setText("");
        panel1.add(phoneNumber, new com.intellij.uiDesigner.core.GridConstraints(2, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(131, 0), null, 0, false));
        userName = new JLabel();
        userName.setText("");
        panel1.add(userName, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(131, 33), null, 0, false));
        userNAmeLabel = new JLabel();
        userNAmeLabel.setText("USerName");
        panel1.add(userNAmeLabel, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(131, 33), null, 0, false));
    }

    /**
     * @noinspection ALL
     */
    public JComponent $$$getRootComponent$$$() {
        return panel1;
    }
}
